home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Games #12
/
GEGA012.iso
/
Jogos de Azar
/
1721-apuesten.swf
/
scripts
/
C_DicesAnimationCLASS.as
< prev
next >
Wrap
Text File
|
2006-01-17
|
1KB
|
42 lines
_global.C_DicesAnimationCLASS = function()
{
this.init();
};
C_DicesAnimationCLASS.prototype = new MovieClip();
C_DicesAnimationCLASS.prototype.init = function()
{
this.start(random(6) + 1,random(6) + 1,true);
};
C_DicesAnimationCLASS.prototype.getDicePos = function()
{
var d = this._currentDiceCaller++ % 2 + 1;
return this["dice_" + d];
};
C_DicesAnimationCLASS.prototype.start = function(first, second, refresh)
{
this.dice_1 = first;
this.dice_2 = second;
this.gotoAndStop(1);
this.gotoAndStop(random(5) + 2);
Conv.stop();
if(refresh)
{
this.dices.gotoAndStop("result");
}
else
{
this.dices.gotoAndPlay(1);
}
};
C_DicesAnimationCLASS.prototype.clear = function()
{
this.dices.gotoAndPlay("result");
Conv.stop();
};
C_DicesAnimationCLASS.prototype.onAnimStoped = function()
{
Conv.play();
};
ASSetPropFlags(_global,"C_DicesAnimationCLASS",131);
Object.registerClass("C_DicesAnimationCLASS",C_DicesAnimationCLASS);